import Child from "./components/Child";
import ClockA from "./components/ClockA";
// import ClockB from "./components/ClockB";
import ClockB from "./components/ClockB/index-ts";
import ComA from "./components/Comlist/index";
import {FC} from "react"
import Com2 from "./components/ClassCom2";
import EventCom from "./components/Event";
import Clipboard from "./components/Jiantie"
import Toggle from "./components/Toggle"
import ComC from "./components/运算符"
import List from "./components/List";
import FromCom from "./components/From表单";
import RefCom from "./components/Ref";
import Parent2 from "./components/生命周期/Parent";
import Composition from "./components/组合";
import A from "./components/Context&Portal";
import ShowModal from "./components/展示Modal";
import Pure from "./components/纯净组件";
import Normal from "./components/HOC/index";
import Base from "./pages/Base";
import { Route,BrowserRouter as Router } from "react-router-dom"
import LazyCom from "./components/懒加载组件";
import ErrorCom from "./components/Error/index";

type Iprops = {
  age?:number
}
let App:FC<Iprops>

App = function(props) {
  let h = (
    <header>
          <h1>一个标题</h1>
        </header>
  )
  let m = (
    <main>
          <h1>一个主题区域</h1>
        </main>
  )
  return (
    <div className="App">
      <Router>
        <ErrorCom>
          <LazyCom/>
        </ErrorCom>
        {/* <Route component={Base}/> */}
        {/* <Base /> */}
      </Router>
      {/* <Normal /> */}
      {/* <Pure/> */}
      {/* <ShowModal/> */}
      {/* <A/> */}
      {/* <Composition header={h} main={m}>

      </Composition> */}
      {/* <Parent2/> */}
      {/* <RefCom /> */}
      {/* <FromCom /> */}
      {/* <List /> */}
      {/* <Child/> */}
      {/* <ClockA date={new Date()} name='李易峰'/> */}
      {/* <ClockB/> */}
      {/* <ComA/> */}
      &nbsp;
      {/* <Com2 /> */}
      {/* <EventCom /> */}
      {/* <Clipboard /> */}
      {/* <Toggle /> */}
      {/* <ComC message={['信用卡账单','蚂蚁花呗账单','京东白条账单','微信分付账单','抖音月付账单','美团分期账单']}/> */}
    </div>
  );
}

// 声明默认的props
App.defaultProps = {
  age:12
}

export default App;
